#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>//
// Created by zyliu on 2020/12/12.
//
int x=0;
pthread_mutex_t daemon_sync_mutex;
pthread_cond_t daemon_sync_cond;


void* f(void* ptr){
    sleep(10);
//    pthread_mutex_lock(&daemon_sync_mutex);
//    pthread_cond_wait(&daemon_sync_cond,&daemon_sync_mutex);

}

int main(){
    pthread_t pid[100];
    pthread_cond_init(&daemon_sync_cond,NULL);
    for(int i=0;i<100;i++){
        pthread_create(&pid[i],NULL,f,NULL);
    }
    for(int i=0;i<100;i++){
        pthread_join(pid[i],NULL);
    }


}
